Hottest Free Downloads - DownloadPipe.com Over 197,000 downloads! Bookmark Now!
DownloadPipe.com - New Downloads Every Minute
 SEARCH:
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Help with small multi-window app

 
   Mac (Home) -> Programmer Help RSS
Next:  Add Printer  
Author Message
Jim

External


Since: Apr 12, 2007
Posts: 9



(Msg. 1) Posted: Mon Nov 03, 2008 7:06 pm
Post subject: Help with small multi-window app
Archived from groups: comp>sys>mac>programmer>help (more info?)

I'm trying to understand how multi-window apps work, or more
specifically windows attached to other objects than the main one.

I've written a very small test app
<http://www.ursaminorbeta.co.uk/test.zip> to demonstrate this (pretty
sure I yanked the binaries - 2.3MB).

Now, I've whipped this up very quickly so I'm aware that's it's got
problems in the memory management area, but I would still expect the
second window to open when I press the button. It doesn't, so I'm making
a fundamental mistake somewhere.

I'd be very grateful if someone could explain it to me using small words
Smile

Many thanks in advance.

Jim
--
'Cloverfield' in nine words: "What is it?!" "We're gonna die!" BOOM!
Roll credits.

http://www.ursaminorbeta.co.uk http://twitter.com/greyareauk
Back to top
Login to vote
Jim

External


Since: Apr 10, 2007
Posts: 38



(Msg. 2) Posted: Tue Nov 04, 2008 8:48 am
Post subject: Re: Help with small multi-window app [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On 2008-11-03, Jim <jim.RemoveThis@magrathea.plus.com> wrote:
>
> I've written a very small test app
><http://www.ursaminorbeta.co.uk/test.zip> to demonstrate this (pretty
> sure I yanked the binaries - 2.3MB).

Bother - I'd put the file in the wrong place on the server, and it couldn't
be downloaded.

Corrected. Sorry about that.

Jim
--
http://www.ursaMinorBeta.co.uk http://twitter.com/GreyAreaUK
"The more wrong a guy gets, the louder he yells at the person
trying to help him. Which, inevitably, makes him even
wronger. But less helped." Merlin Mann
Back to top
Login to vote
Gregory Weston

External


Since: Jun 06, 2005
Posts: 660



(Msg. 3) Posted: Tue Nov 04, 2008 8:56 am
Post subject: Re: Help with small multi-window app [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

In article <1ipufkt.15undtah98xufN%jim@magrathea.plus.com>,
jim.TakeThisOut@magrathea.plus.com (Jim) wrote:

> I'm trying to understand how multi-window apps work, or more
> specifically windows attached to other objects than the main one.
>
> I've written a very small test app
> <http://www.ursaminorbeta.co.uk/test.zip> to demonstrate this (pretty
> sure I yanked the binaries - 2.3MB).

While I'm waiting for it to download, I'm going to guess you didn't.
There's no way a "very small" test app should have source/resources that
make a 2MB zip file. That dwarfs a large percentage of fully functional
released software.

Now downloaded and unzipped, I see the "build" folder is 5.5MB. You
yanked the binaries but not a whole bunch of build by-product.


> Now, I've whipped this up very quickly so I'm aware that's it's got
> problems in the memory management area, but I would still expect the
> second window to open when I press the button. It doesn't, so I'm making
> a fundamental mistake somewhere.
>
> I'd be very grateful if someone could explain it to me using small words
> Smile

The secondObject you've created dynamically at runtime doesn't have
anything bound to its theWindow instance variable. I'm on a 10.4 machine
right now so I can't read XIB files without a lot of eyestrain, but I'm
guessing you instantiated a secondObject in that file and tied a window
instance to it and wondered why that's not working. The answer is that
the code that reacts to your button press doesn't use the XIB's
secondObject. It makes its own.

Solutions:

1. Give your firstObject an outlet that references a secondObject and
establish that relationship in the XIB. Then use the outlet in your
button: method.

2. Have your secondObject class, on initialization, create its own
window (or load one from the app resources).

--
"Harry?" Ron's voice was a mere whisper. "Do you smell something ... burning?"
- Harry Potter and the Odor of the Phoenix
Back to top
Login to vote
Jim

External


Since: Apr 10, 2007
Posts: 38



(Msg. 4) Posted: Tue Nov 04, 2008 2:55 pm
Post subject: Re: Help with small multi-window app [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On 2008-11-04, Gregory Weston <uce RemoveThis @splook.com> wrote:
> In article <1ipufkt.15undtah98xufN%jim@magrathea.plus.com>,
> jim RemoveThis @magrathea.plus.com (Jim) wrote:
>
>> I'm trying to understand how multi-window apps work, or more
>> specifically windows attached to other objects than the main one.
>>
>> I've written a very small test app
>> <http://www.ursaminorbeta.co.uk/test.zip> to demonstrate this (pretty
>> sure I yanked the binaries - 2.3MB).
>
> While I'm waiting for it to download, I'm going to guess you didn't.
> There's no way a "very small" test app should have source/resources that
> make a 2MB zip file. That dwarfs a large percentage of fully functional
> released software.

Yes, sorry about that. I clicked the 'Clean All' button and foolishly
thought it got rid of, well, rather more than it does.

>
> Now downloaded and unzipped, I see the "build" folder is 5.5MB. You
> yanked the binaries but not a whole bunch of build by-product.

I'm never sure what's safe to remove and what isn't. I assume I could have
deep-6'd the Build folders as well?


>> Now, I've whipped this up very quickly so I'm aware that's it's got
>> problems in the memory management area, but I would still expect the
>> second window to open when I press the button. It doesn't, so I'm making
>> a fundamental mistake somewhere.
>>
>> I'd be very grateful if someone could explain it to me using small words
>> Smile
>
> The secondObject you've created dynamically at runtime doesn't have
> anything bound to its theWindow instance variable. I'm on a 10.4 machine
> right now so I can't read XIB files without a lot of eyestrain, but I'm
> guessing you instantiated a secondObject in that file and tied a window
> instance to it and wondered why that's not working. The answer is that
> the code that reacts to your button press doesn't use the XIB's
> secondObject. It makes its own.

Aaaaaaah. Yes, I _think_ I understand what you mean there.

>
> Solutions:
>
> 1. Give your firstObject an outlet that references a secondObject and
> establish that relationship in the XIB. Then use the outlet in your
> button: method.

O....kay. _Think_ I know what you mean.

>
> 2. Have your secondObject class, on initialization, create its own
> window (or load one from the app resources).
>

I'll have a twiddle with (1) I think.

Many thanks.

Jim
--
http://www.ursaMinorBeta.co.uk http://twitter.com/GreyAreaUK
"The more wrong a guy gets, the louder he yells at the person
trying to help him. Which, inevitably, makes him even
wronger. But less helped." Merlin Mann
Back to top
Login to vote
Jim

External


Since: Apr 10, 2007
Posts: 38



(Msg. 5) Posted: Tue Nov 04, 2008 3:06 pm
Post subject: Re: Help with small multi-window app [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On 2008-11-04, Jim <jim.DeleteThis@magrathea.plus.com> wrote:
>>
>> Solutions:
>>
>> 1. Give your firstObject an outlet that references a secondObject and
>> establish that relationship in the XIB. Then use the outlet in your
>> button: method.
>
> O....kay. _Think_ I know what you mean.
>
>>
>> 2. Have your secondObject class, on initialization, create its own
>> window (or load one from the app resources).
>>
>
> I'll have a twiddle with (1) I think.

And one quick furtle later and it works.

Thank you very much.

Jim
--
http://www.ursaMinorBeta.co.uk http://twitter.com/GreyAreaUK
"The more wrong a guy gets, the louder he yells at the person
trying to help him. Which, inevitably, makes him even
wronger. But less helped." Merlin Mann
Back to top
Login to vote
Display posts from previous:   
Related Topics:
multi threading, not unloading threads - ok, i found out that all sounds MUST be played in the main thread for some reason so here's what i've done detatch a thread that scans for the sound file and then loads it into an array when that thread is finished, it sets a boolean value saying the...

Some small (?) Carbon troubles - Hey, Im trying to use carbon to make a small app for an image gallery im working on. All this app needs to do is watch for new images to appear in a directory, then possibly rotate them and create a thumbnail, then move everything to another directory.....

Small problem with NSTableView delegate - I'm doing a small hack project to try to learn a bit about NSTableViews. I've created a window with one such, set its dataSource to an object containing an NSMutableArray, then tried to set up the delegates. It's mostly working fine. The only one I'm..

How to remove all submenu in hierachical multi-level menu .. - Something like [NSPopUpButton removeAllItems] (but for menu bar item) ? Or each submenu/item menu must be removed one each at time ? How do this ? Thank you.

window server - Hi How can i know , is my application using windowserver ? My application is using IOkit and runloop concept. I put it in startupitems. it execute successfully on 10.4 but on 10.5 following thing happen ->warning - 3891612 , untrusted application a...
       Mac (Home) -> Programmer Help All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum
Categories:
 Windows Forums
 Game Forums
 Linux Forums
  Mac Forums
 PDA Forums
 Mobile Forums
  Top  |  Store  |  RSS Feeds RSS  |  Data Feeds  |  Advertise  |  Submit  |  Bookmark  |  Newsletter  |  Contact