🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.sys.next.programmer
1 messages
1 total messages Started by bill Fri, 14 Aug 1992 14:57
Question about assigning a SoundView to a ScrollView
#1138
Author: bill
Date: Fri, 14 Aug 1992 14:57
73 lines
2353 bytes
The follow code is from a quick palette I put together in which I was  
attempting to make a SoundView palette.  It seems to work fine execpt in  
an actual application, I can not get the graphical portion of the sound  
file to show up on the the ScrollView.


from the palette:

-initFrame:(const NXRect *)frameRect
{
    NXRect tempRect = *frameRect;
    int borderType = NX_NOBORDER;
     
    [super initFrame:frameRect];
    [ScrollView getContentSize:&tempRect.size  
forFrameSize:&frameRect->size
    		horizScroller:YES vertScroller:NO borderType:borderType];
		
    theSoundView = [[SoundView alloc] initFrame:&tempRect];
    
    [self setHorizScrollerRequired:YES];
    [self setDynamicScrolling:YES];
    [self setDocView:theSoundView];
    
    [self setBackgroundGray:NX_WHITE];
    [self setBorderType:NX_BEZEL];
    [self setAutoresizeSubviews:YES];
    [self setAutosizing:NX_WIDTHSIZABLE|NX_HEIGHTSIZABLE];

    [[theSoundView superview] setAutoresizeSubviews:YES];
    [theSoundView setAutosizing:NX_HEIGHTSIZABLE];

  //  [self setBackgroundColor:NX_COLORWHITE];
    [self setBorderType:NX_BEZEL];
    [self display];
    return self;
}



from my application:

- openFile:(char *)fileName
{
    id aSound;
    
    mySoundView = [ScrollView1 docView];
    [mySoundView setSound:[[Sound alloc] init]];
    aSound = [[Sound alloc] initFromSoundfile:fileName];
    
    [mySoundView setSound:aSound];
    [mySoundView setDisplayMode:SK_DISPLAY_WAVE];
    [ScrollView2 setDocView:mySoundView];
    
    [MyScrollWindow setTitleAsFilename:fileName];
    [MyScrollWindow setMiniwindowIcon: "SoundIcon"];
    
    [mySoundView display];
    [ScrollView2 display];

    [NXApp stopModal];
   return aSound;
}

I have tied the above [display] both individually and in different  
combinatins.

Any help would be apprectiated.

Thanks much in advance.


Bill
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads