CPWindow Won't Show

58 views
Skip to first unread message

Keary Suska

unread,
Jan 10, 2015, 5:26:55 PM1/10/15
to objec...@googlegroups.com
Using XcodeCapp...everything was working fine until I renamed my window controller class but now I cannot get the window to show by any means other than as a sheet.

The code in my window controller is:

returnCode = [CPApp runModalForWindow:[self window]];

Simply calling [self showWindow:self] doesn't work either. No error--just silently refuses to display the window. I can see and test that the cib is being loaded and that the window exists as expected, but no show.

I have forced XcodeCapp to recreate the cib, but to no avail. The xib looks fine--the file's owner has the correct class and the outlet is wired.

Is there any way to debug this?

Keary Suska
Esoteritech, Inc.
"Demystifying technology for your home or business"

Andrew Hankinson

unread,
Jan 10, 2015, 10:51:47 PM1/10/15
to objec...@googlegroups.com
What version of Capp are you running?
> --
> You received this message because you are subscribed to the Google Groups "Cappuccino & Objective-J" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to objectivej+...@googlegroups.com.
> To post to this group, send email to objec...@googlegroups.com.
> Visit this group at http://groups.google.com/group/objectivej.
> For more options, visit https://groups.google.com/d/optout.

Keary Suska

unread,
Jan 11, 2015, 10:37:14 AM1/11/15
to objec...@googlegroups.com
On Jan 10, 2015, at 8:51 PM, Andrew Hankinson <andrew.h...@gmail.com> wrote:

> What version of Capp are you running?

Latest master, I hope. Showing version 0.9.7-1 (last commit January 9, 2015 at 11:41:52 AM MST).

Andrew Hankinson

unread,
Jan 11, 2015, 12:13:12 PM1/11/15
to objec...@googlegroups.com
Can you post a reduction?

How did you rename your Window Controller class? It may be a typo?

-Andrew

Didier Korthoudt

unread,
Jan 11, 2015, 12:37:09 PM1/11/15
to objec...@googlegroups.com, cappu...@esoteritech.com
I had once the same problem but... it was only my fault...

Please check :

- typo of the filename containing the class ;
- typo of the classname ;
- typo of the include ;
- typo of the variables declarations.

My fault was simply that I forgot to change the include...

Hope this helps,


Didier.

daboe01

unread,
Jan 12, 2015, 2:06:05 AM1/12/15
to objec...@googlegroups.com, cappu...@esoteritech.com
make sure your browser-cache is cleared.

Keary Suska

unread,
Jan 12, 2015, 11:25:13 AM1/12/15
to objec...@googlegroups.com
No typo that I can see. The curious thing is that the class loads and functions properly. It is only the window in the cib that will not show, unless I show it as a sheet. Then it works.

> make sure your browser-cache is cleared.

Re-cleared and re-tested, same result. I also get the same result in multiple browsers.

Thanks,

Keary Suska

unread,
Jan 12, 2015, 11:56:13 AM1/12/15
to objec...@googlegroups.com
On Jan 11, 2015, at 10:13 AM, Andrew Hankinson <andrew.h...@gmail.com> wrote:

> Can you post a reduction?

I have attached a reduction to this email--I didn't want to file a bug as among other things, I am not exactly sure what is wrong (i.e. is it a framework or nib2cib bug, if a bug at all?)

TIA,
test.zip

Andrew Hankinson

unread,
Jan 12, 2015, 12:10:29 PM1/12/15
to objec...@googlegroups.com
I don't know if this is just a typo in your reduction, but your Cib is named "Login" while the `initWithWindowCibNamed` is looking for "LogIn"

-Andrew
> --
> You received this message because you are subscribed to the Google Groups "Cappuccino & Objective-J" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to objectivej+...@googlegroups.com.
> To post to this group, send email to objec...@googlegroups.com.
> Visit this group at http://groups.google.com/group/objectivej.
> For more options, visit https://groups.google.com/d/optout.
> <test.zip>

Keary Suska

unread,
Jan 12, 2015, 5:11:00 PM1/12/15
to objec...@googlegroups.com
On Jan 12, 2015, at 10:10 AM, Andrew Hankinson <andrew.h...@gmail.com> wrote:

> I don't know if this is just a typo in your reduction, but your Cib is named "Login" while the `initWithWindowCibNamed` is looking for "LogIn"

I hadn't noticed that, which would bite me later, but isn't involved in the current issue--i.e. the cib loads fine as far as I can tell and fixing the typo does not correct the problem in either the reduction or original.

Note that the typo probably happened when I tried to reconstruct the xib from scratch (mostly--I copied the fields and buttons but reconstructed everything else fresh). So, I have tried that as well, in case anyone thinks to recommend it ;-)


>> On Jan 12, 2015, at 11:56 AM, Keary Suska <cappu...@esoteritech.com> wrote:
>>
>> On Jan 11, 2015, at 10:13 AM, Andrew Hankinson <andrew.h...@gmail.com> wrote:
>>
>>> Can you post a reduction?
>>
>> I have attached a reduction to this email--I didn't want to file a bug as among other things, I am not exactly sure what is wrong (i.e. is it a framework or nib2cib bug, if a bug at all?)


Andrew Hankinson

unread,
Jan 12, 2015, 5:24:18 PM1/12/15
to objec...@googlegroups.com
Well, you're also calling 'orderOut' in `presentLoginWindow` which immediately hides it once it's been shown. If I comment out the `orderOut:` it works fine.


-Andrew

Keary Suska

unread,
Jan 13, 2015, 10:18:29 AM1/13/15
to objec...@googlegroups.com
On Jan 12, 2015, at 3:24 PM, Andrew Hankinson <andrew.h...@gmail.com> wrote:

> Well, you're also calling 'orderOut' in `presentLoginWindow` which immediately hides it once it's been shown. If I comment out the `orderOut:` it works fine.
>
> https://dl.dropboxusercontent.com/u/1996023/capp/WindowControllerTest.mov

OK, so the real issue is that Capp doesn't handle modal sessions the same. If the following code returns immediately:

returnCode = [CPApp runModalForWindow:[self window]];

can returnCode ever have a real value?

Ross Boucher

unread,
Jan 13, 2015, 10:35:31 AM1/13/15
to objec...@googlegroups.com
JavaScript is a single threaded language, and that thread blocks the browser's other functions, so you can't have blocking code like that (with the exception of the built-in functions like alert).

Reply all
Reply to author
Forward
0 new messages