Hello Quentin,

On Fri, May 11, 2012 at 12:25 AM, Quentin Mathé <[email protected]> wrote:

> Hi,
>
> Le 10 mai 2012 à 17:42, Al Chemyth a écrit :
>
> > Hello,
> > I'm trying to port my application to EtoileUI, having the principal
> class was subclassing ETApplication. But once I replaced NSApplicationMain
> with ETApplicationMain, this problem raised.
>
> Although EtoileUI reuses various basic classes such as NSImage, NSFont
> etc., you cannot really port an AppKit application to EtoileUI, because
> EtoileUI has its own overall architecture that is the same than the AppKit.
> Many AppKit classes or rules are not valid when writing an EtoileUI
> application. So replacing NSApplication() by ETApplicationMain() won't work.
>
>
I see, I am willing to rewrite them. There is no specific UI that the
application needs at this point. Most of them are Gorm's widgets. I'm also
willing to replace DPS operations with Opal but I'll look into that in a
new branch.


> You have to rewrite the UI almost from scratch. You can just reuse some
> Nibs with ETNibOwner and ETController. In the future, we will probably
> support reusing an existing AppKit view hierarchy packaged as a layout. For
> now, this last possibility might work but it is untested (you can try
> +[ETLayout layoutWithLayoutView:]).
>
> > 2012-05-10 15:38:59.014 3SUM[4259] DPSinvalidparam: Invalid gstate index
> > 2012-05-10 15:38:59.059 3SUM[4259] DPSinvalidparam: Invalid userobject
> index
> > 2012-05-10 15:38:59.059 3SUM[4259] DPSstackunderflow: Attempt to pop
> from empty stack
>
> It's hard to tell what the problem is without a backtrace… If you could
> post one, that would help.
>
>
Here I supply the backtrace.

(gdb) bt
#0  NSLog (format=0xb2acc6f0) at NSLog.m:249
#1  0xb2a61215 in -[GSContext(NSGraphics) DPSundefineuserobject:] (
    self=<error reading variable: Unhandled dwarf expression opcode 0x0>,
    _cmd=0xb2acb6b8, index=<optimized out>) at GSContext.m:964
#2  0xb2a5e8c0 in -[GSContext(Ops) GSUndefineGState:] (self=0x87a3724,
    _cmd=0xb7a40788, gst=3) at GSContext.m:488
#3  0xb784583a in GSUndefineGState (ctxt=<optimized out>, gst=<optimized
out>,
    ctxt=<optimized out>, gst=<optimized out>)
    at ../Headers/AppKit/DPSOperators.h:758
#4  -[NSWindow _terminateBackendWindow] (self=<optimized out>,
_cmd=0xb7a400f8)
    at NSWindow.m:754
#5  0xb7846070 in -[NSWindow dealloc] (
    self=<error reading variable: Asked for position 0 of stack, stack only
has 0 elements on it.>, _cmd=<optimized out>) at NSWindow.m:815
#6  0xb70dfa70 in -[NSObject release] (
    self=<error reading variable: Unhandled dwarf expression opcode 0x0>,
    _cmd=0xb79dbd00) at NSObject.m:2049
#7  0xb763e8a6 in -[NSCachedImageRep dealloc] (self=0x87ac78c,
_cmd=0xb73d4b78)
    at NSCachedImageRep.m:178
#8  0xb70dfa70 in -[NSObject release] (
    self=<error reading variable: Unhandled dwarf expression opcode 0x0>,
    _cmd=0xb79f8cc8) at NSObject.m:2049
#9  0xb76cd274 in -[GSRepData dealloc] (self=<optimized out>,
_cmd=0xbfffe5d0)
    at NSImage.m:113
#10 0xb70dfa70 in -[NSObject release] (
    self=<error reading variable: Unhandled dwarf expression opcode 0x0>,
    _cmd=0xb73a18d8) at NSObject.m:2049
#11 0xb6f7a3c1 in -[GSArray dealloc] (
    self=<error reading variable: Unhandled dwarf expression opcode 0x0>,
    _cmd=0xbfffe620) at GSArray.m:136
#12 0xb70dfa70 in -[NSObject release] (
    self=<error reading variable: Unhandled dwarf expression opcode 0x0>,
    _cmd=0xb79f8cc8) at NSObject.m:2049
#13 0xb76ce87c in -[NSImage dealloc] (self=<optimized out>, _cmd=0xbfffe680)
    at NSImage.m:409
#14 0xb70dfa70 in -[NSObject release] (
    self=<error reading variable: Unhandled dwarf expression opcode 0x0>,
    _cmd=0xb79dd618) at NSObject.m:2049
#15 0xb7642c26 in -[NSCell setImage:] (
    self=<error reading variable: DWARF-2 expression error: `DW_OP_regx'
operations must be used either alone or in conjunction with DW_OP_piece or
DW_OP_bit_piece.>, _cmd=<optimized out>,
    anImage=<error reading variable: DWARF-2 expression error: DW_OP_reg
operations must be used either alone or in conjunction with DW_OP_piece or
DW_OP_bit_piece.>) at NSCell.m:1210
#16 0xb75ebdf3 in -[NSAppIconView setImage:] (
    self=<error reading variable: Unhandled dwarf expression opcode 0xc0>,
    _cmd=0xb79d0ac0, anImage=0x8f1d46c) at NSApplication.m:717
#17 0xb75f328a in -[NSApplication setApplicationIconImage:] (
    self=<error reading variable: Unhandled dwarf expression opcode 0xbb>,
    _cmd=0xb7a67cc0, anImage=<optimized out>) at NSApplication.m:2360
#18 0xb790404e in +[GSGormLoader initialize] (self=<optimized out>,
    _cmd=0x811ede0) at GSGormLoader.m:80
#19 0xb6cc8025 in objc_send_initialize (
    object=<error reading variable: Unhandled dwarf expression opcode 0x0>)
    at dtable.c:733
#20 0xb6cd0950 in objc_msg_lookup_internal (receiver=<optimized out>,
    selector=<optimized out>, sender=<optimized out>) at sendmsg2.c:67
#21 objc_msg_lookup_sender (receiver=<optimized out>,
    selector=<optimized out>, sender=<optimized out>) at sendmsg2.c:148
#22 0xb7ef201b in -[ETModelDescriptionRepository
addUnresolvedEntityDescriptionForClass:] (self=0x87fd49c, _cmd=0xb7f2f4e8,
aClass=0xb7a67c40)
    at Source/ETModelDescriptionRepository.m:50
#23 0xb7ef2416 in -[ETModelDescriptionRepository
collectEntityDescriptionsFromClass:excludedClasses:resolveNow:] (
    self=<error reading variable: Unhandled dwarf expression opcode 0xc5>,
    _cmd=0xb7f2f548, aClass=0xb73d48b0, excludedClasses=<optimized out>,
    resolve=<optimized out>) at Source/ETModelDescriptionRepository.m:66
#24 0xb7ef2601 in +[ETModelDescriptionRepository mainRepository] (
---Type <return> to continue, or q <return> to quit---
    self=<optimized out>, _cmd=0xb66d15d8)
    at Source/ETModelDescriptionRepository.m:81
#25 0xb666ddb4 in -[COObject
commonInitWithUUID:entityDescription:rootObject:context:isFault:] (
    self=<error reading variable: Unhandled dwarf expression opcode 0xa9>,
    _cmd=<optimized out>, aUUID=<optimized out>,
    anEntityDescription=<optimized out>, aRootObject=<optimized out>,
    aContext=<optimized out>, isFault=<optimized out>) at COObject.m:144
#26 0xb666e42d in -[COObject init] (
    self=<error reading variable: Unhandled dwarf expression opcode 0x0>,
    _cmd=0xbfffeb50) at COObject.m:198
#27 0xb7ce7b1c in -[ETLayout initWithLayoutView:] (
    self=<error reading variable: Asked for position 0 of stack, stack only
has 0 elements on it.>, _cmd=0xb7e3e5d8,
    aView=<error reading variable: Unhandled dwarf expression opcode 0xd6>)
    at ETLayout.m:197
#28 0xb7d219b8 in -[ETWidgetLayout initWithLayoutView:] (self=<optimized
out>,
    _cmd=0xb7e39aa8, aView=<optimized out>) at ETWidgetLayout.m:34
#29 0xb7ce7f80 in -[ETLayout init] (self=0x87e34e4, _cmd=0xb7e39930)
    at ETLayout.m:253
#30 0xb7ce6d3c in +[ETLayout registerAspects] (self=<optimized out>,
    _cmd=0xb7e34480) at ETLayout.m:65
#31 0xb7c9044a in -[ETApplication _registerAllAspects] (
    self=<error reading variable: Unhandled dwarf expression opcode 0x0>,
    _cmd=0xb7e34608) at ETApplication.m:251
#32 0xb7c8fd43 in -[ETApplication setUp] (self=0x85e1a24, _cmd=0xb7e343b0)
    at ETApplication.m:160
#33 0xb7c98677 in ETApplicationMain (argc=1, argv=0xbfffefb4)
    at ETApplication.m:1121
#34 0xb69e84d3 in __libc_start_main (main=0x805a040 <main>, argc=1,
    ubp_av=0xbfffefb4, init=0x80976b0 <__libc_csu_init>,
    fini=0x8097720 <__libc_csu_fini>, rtld_fini=0xb7fed270 <_dl_fini>,
    stack_end=0xbfffefac) at libc-start.c:226
#35 0x08059fa9 in _start ()



> However EtoileUI is currently broken because of CoreObject changes. I hope
> to fix the problem tomorrow.
>

I decide I will actually start working on a new branch for EtoileUI around
the end of June. Until then I will be investigating possibilities and doing
more experiments with EtoileUI.


>
> > The above methods were the only changes I made to the application. Is
> this expected? Anyone is familiar with the problem or know where I should
> take a peek?
>
> If your code is visible somewhere, I could take a look and give you some
> hints about how to rewrite the UI with EtoileUI.
>
>
The tree can be browsed from the URL below. The principal class files are
MUS3.[mh]. TT3DContentView is an NSView subclass. TT*Controller and
TTDocument are window controllers and document class. The rest of the files
don't have much to do with the GUI.

http://mus3.git.sourceforge.net/git/gitweb.cgi?p=mus3/3SUM;a=tree;f=mus3;h=1d8fcc1d2a22de51331364519f0f77789961dcc9;hb=HEAD

If this could help, the full instructions to build and run the application.

https://sourceforge.net/apps/mediawiki/mus3/index.php?title=Main_Page#GIT



> Cheers,
> Quentin.
>

Best,
Al Chemyth.


> _______________________________________________
> Etoile-discuss mailing list
> [email protected]
> https://mail.gna.org/listinfo/etoile-discuss
>
_______________________________________________
Etoile-discuss mailing list
[email protected]
https://mail.gna.org/listinfo/etoile-discuss

Répondre à