[vlc-devel] commit: macosx: draft for 'dialog-progress-bar' and clean up ( Felix Paul Kühne )

Pierre d'Herbemont pdherbemont at free.fr
Fri Apr 10 05:56:50 CEST 2009


Felix,

This can't work as we are referencing to a pointer to which we don't
own any reference.

    const dialog_fatal_t *p_dialog = (const dialog_fatal_t *)value.p_address;

    NSValue *o_value = [NSValue valueWithPointer:p_dialog];
    [[NSNotificationCenter defaultCenter] postNotificationName:
@"VLCNewCoreDialogEventNotification" object:[interface
getCoreDialogProvider] userInfo:[NSDictionary
dictionaryWithObjectsAndKeys: o_value ... ]];

I would suggest to create a container object that would copy p_dialog members.

Else, we risk a crash.

BTW, I would also suggest to dump the silly prefixing in gui/macosx
and switch to the naming defined by:
http://developer.apple.com/DOCUMENTATION/Cocoa/Conceptual/CodingGuidelines/CodingGuidelines.html

(getXXX is not cocoa-ish)

An other remark. I don't understand why a notification is used here. a
simple performSelectorOnMainThread would just do the trick fine, while
being less error prone.

Pierre.


On Wed, Apr 8, 2009 at 4:08 AM, git version control <git at videolan.org> wrote:
> vlc | branch: master | Felix Paul Kühne <fkuehne at videolan.org> | Wed Apr  8 13:08:14 2009 +0200| [cdda10eff25aa363704bc830269ac0f1cbe7018a] | committer: Felix Paul Kühne
>
> macosx: draft for 'dialog-progress-bar' and clean up
>
> This isn't fully functional, as the callbacks aren't being triggered, although set. Needs some more investigation.
>
>> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=cdda10eff25aa363704bc830269ac0f1cbe7018a
> ---
>
>  .../English.lproj/CoreDialogs.nib/classes.nib      |    6 +-
>  .../English.lproj/CoreDialogs.nib/keyedobjects.nib |  Bin 8670 -> 8897 bytes
>  .../package/macosx/vlc.xcodeproj/project.pbxproj   |    8 +-
>  modules/gui/macosx/coredialogs.h                   |    9 +-
>  modules/gui/macosx/coredialogs.m                   |  141 ++++++++++++++------
>  modules/gui/macosx/intf.m                          |    4 -
>  6 files changed, 110 insertions(+), 58 deletions(-)
>
> Diff:   http://git.videolan.org/gitweb.cgi/vlc.git/?a=commitdiff;h=cdda10eff25aa363704bc830269ac0f1cbe7018a
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> http://mailman.videolan.org/listinfo/vlc-devel
>



More information about the vlc-devel mailing list