Code injection and replace methods at runtime

  • I've just read this article of Scott Stevenson about method replacing
    in obj-c runtime:
    http://theocacao.com/document.page/266

    the main application is to replace the standard methods of a class in
    a cocoa program. Now my question: is possible to replace, for example,
    the standard Open and Save dialog /so the relative classes) with a
    modified version? Is it possible, and how can I do it?
    Thank you very much
    malcom
  • Yes, you want the poseAsClass: method.  Not entirely sure it's a good
    idea though!

    Mike.

    On 10 Oct 2006, at 10:21, malcom wrote:

    > I've just read this article of Scott Stevenson about method replacing
    > in obj-c runtime:
    > http://theocacao.com/document.page/266
    >
    > the main application is to replace the standard methods of a class in
    > a cocoa program. Now my question: is possible to replace, for example,
    > the standard Open and Save dialog /so the relative classes) with a
    > modified version? Is it possible, and how can I do it?
    > Thank you very much
    > malcom
    > _______________________________________________
    > Do not post admin requests to the list. They will be ignored.
    > Cocoa-dev mailing list      (<Cocoa-dev...>)
    > Help/Unsubscribe/Update your Subscription:
    > http://lists.apple.com/mailman/options/cocoa-dev/mike.abdullah%
    > 40gmail.com
    >
    > This email sent to <mike.abdullah...>
  • Now, is this for educational purpose or what exactly are you planning to do?
    Do you plan to globally change the system open and save dialogs for
    all application, not just your application?
  • Thanks mike.
    Ok it's for educational purpose and yes I would to try replace Open
    and Save Dialogs in my system. Where can I found a tutorial, note or
    something where I can learn how to use poseAsClass: method inorder to
    make a thing like this?
    Thanks
    malcom

    On 10/10/06, Roger Persson <perrog...> wrote:
    > Now, is this for educational purpose or what exactly are you planning to do?
    > Do you plan to globally change the system open and save dialogs for
    > all application, not just your application?
    >
  • Try Googling poseAsClass. The first hit I got looks like a good start.

    Boyd

    On Oct 10, 2006, at 10:31 AM, malcom wrote:

    > Thanks mike.
    > Ok it's for educational purpose and yes I would to try replace Open
    > and Save Dialogs in my system. Where can I found a tutorial, note or
    > something where I can learn how to use poseAsClass: method inorder to
    > make a thing like this?
    > Thanks
    > malcom
    >
    > On 10/10/06, Roger Persson <perrog...> wrote:
    >> Now, is this for educational purpose or what exactly are you
    >> planning to do?
    >> Do you plan to globally change the system open and save dialogs for
    >> all application, not just your application?
    >>
    > _______________________________________________
    > Do not post admin requests to the list. They will be ignored.
    > Cocoa-dev mailing list      (<Cocoa-dev...>)
    > Help/Unsubscribe/Update your Subscription:
    > http://lists.apple.com/mailman/options/cocoa-dev/bcollier%
    > 40sunstroke.sdsu.edu
    >
    > This email sent to <bcollier...>
    >
  • Thanks. But I've another question. By posing another modified class it
    will be changed at system level?

    On 10/10/06, Boyd Collier <bcollier...> wrote:
    > Try Googling poseAsClass. The first hit I got looks like a good start.
    >
    > Boyd
    >
    >
    > On Oct 10, 2006, at 10:31 AM, malcom wrote:
    >
    >> Thanks mike.
    >> Ok it's for educational purpose and yes I would to try replace Open
    >> and Save Dialogs in my system. Where can I found a tutorial, note or
    >> something where I can learn how to use poseAsClass: method inorder to
    >> make a thing like this?
    >> Thanks
    >> malcom
    >>
    >> On 10/10/06, Roger Persson <perrog...> wrote:
    >>> Now, is this for educational purpose or what exactly are you
    >>> planning to do?
    >>> Do you plan to globally change the system open and save dialogs for
    >>> all application, not just your application?
    >>>
    >> _______________________________________________
    >> Do not post admin requests to the list. They will be ignored.
    >> Cocoa-dev mailing list      (<Cocoa-dev...>)
    >> Help/Unsubscribe/Update your Subscription:
    >> http://lists.apple.com/mailman/options/cocoa-dev/bcollier%
    >> 40sunstroke.sdsu.edu
    >>
    >> This email sent to <bcollier...>
    >>
    >
    >

    --
    www.malcom-mac.com - indipendent software developer
    mail: <malcom.mac...>
  • no, just in your current app.

    Am 10.10.2006 um 21:39 schrieb malcom:

    > Thanks. But I've another question. By posing another modified class it
    > will be changed at system level?
    >
    > On 10/10/06, Boyd Collier <bcollier...> wrote:
    >> Try Googling poseAsClass. The first hit I got looks like a good
    >> start.
    >>
    >> Boyd
    >>
    >>
    >> On Oct 10, 2006, at 10:31 AM, malcom wrote:
    >>
    >>> Thanks mike.
    >>> Ok it's for educational purpose and yes I would to try replace Open
    >>> and Save Dialogs in my system. Where can I found a tutorial,
    >> note or
    >>> something where I can learn how to use poseAsClass: method
    >> inorder to
    >>> make a thing like this?
    >>> Thanks
    >>> malcom
    >>>
    >>> On 10/10/06, Roger Persson <perrog...> wrote:
    >>>> Now, is this for educational purpose or what exactly are you
    >>>> planning to do?
    >>>> Do you plan to globally change the system open and save dialogs
    >> for
    >>>> all application, not just your application?
    >>>>
    >>> _______________________________________________
    >>> Do not post admin requests to the list. They will be ignored.
    >>> Cocoa-dev mailing list      (<Cocoa-dev...>)
    >>> Help/Unsubscribe/Update your Subscription:
    >>> http://lists.apple.com/mailman/options/cocoa-dev/bcollier%
    >>> 40sunstroke.sdsu.edu
    >>>
    >>> This email sent to <bcollier...>
    >>>
    >>
    >>
    >
    >
    > --
    > www.malcom-mac.com - indipendent software developer
    > mail: <malcom.mac...>
    > _______________________________________________
    > Do not post admin requests to the list. They will be ignored.
    > Cocoa-dev mailing list      (<Cocoa-dev...>)
    > Help/Unsubscribe/Update your Subscription:
    > http://lists.apple.com/mailman/options/cocoa-dev/<atze...>
    >
    > This email sent to <atze...>

    Freeport & Soliversum
    Alexander Spohr
    <atze...>
    www.freeport.de
  • mmmm it's a bad news... because there is Default Folder that makes a
    thing like this but I don't know how it works and how it's possible.

    On 10/10/06, Alexander Spohr <atze...> wrote:
    > no, just in your current app.
    >
    > Am 10.10.2006 um 21:39 schrieb malcom:
    >
    >> Thanks. But I've another question. By posing another modified class it
    >> will be changed at system level?
    >>
    >> On 10/10/06, Boyd Collier <bcollier...> wrote:
    >>> Try Googling poseAsClass. The first hit I got looks like a good
    >>> start.
    >>>
    >>> Boyd
    >>>
    >>>
    >>> On Oct 10, 2006, at 10:31 AM, malcom wrote:
    >>>
    >>>> Thanks mike.
    >>>> Ok it's for educational purpose and yes I would to try replace Open
    >>>> and Save Dialogs in my system. Where can I found a tutorial,
    >>> note or
    >>>> something where I can learn how to use poseAsClass: method
    >>> inorder to
    >>>> make a thing like this?
    >>>> Thanks
    >>>> malcom
    >>>>
    >>>> On 10/10/06, Roger Persson <perrog...> wrote:
    >>>>> Now, is this for educational purpose or what exactly are you
    >>>>> planning to do?
    >>>>> Do you plan to globally change the system open and save dialogs
    >>> for
    >>>>> all application, not just your application?
    >>>>>
    >>>> _______________________________________________
    >>>> Do not post admin requests to the list. They will be ignored.
    >>>> Cocoa-dev mailing list      (<Cocoa-dev...>)
    >>>> Help/Unsubscribe/Update your Subscription:
    >>>> http://lists.apple.com/mailman/options/cocoa-dev/bcollier%
    >>>> 40sunstroke.sdsu.edu
    >>>>
    >>>> This email sent to <bcollier...>
    >>>>
    >>>
    >>>
    >>
    >>
    >> --
    >> www.malcom-mac.com - indipendent software developer
    >> mail: <malcom.mac...>
    >> _______________________________________________
    >> Do not post admin requests to the list. They will be ignored.
    >> Cocoa-dev mailing list      (<Cocoa-dev...>)
    >> Help/Unsubscribe/Update your Subscription:
    >> http://lists.apple.com/mailman/options/cocoa-dev/<atze...>
    >>
    >> This email sent to <atze...>
    >
    > Freeport & Soliversum
    > Alexander Spohr
    > <atze...>
    > www.freeport.de
    >
    >
    >

    --
    www.malcom-mac.com - indipendent software developer
    mail: <malcom.mac...>
  • Am 10.10.2006 um 21:39 schrieb malcom:
    > Thanks. But I've another question. By posing another modified class it
    > will be changed at system level?

      Google for "mach inject", "unsanity APE" or "SIMBL", that's the
    three ways used to get your code to run in other apps. Just note that
    not all apps are Cocoa apps, so replacing NSOpenPanel etc. will not
    catch all open panels.

    Cheers,
    -- M. Uli Kusterer
    http://www.zathras.de
  • El 10/10/2006, a las 20:25, Boyd Collier escribió:

    > Try Googling poseAsClass. The first hit I got looks like a good start.
    >
    > Boyd
    >
    >
    > On Oct 10, 2006, at 10:31 AM, malcom wrote:
    >
    >> Thanks mike.
    >> Ok it's for educational purpose and yes I would to try replace Open
    >> and Save Dialogs in my system. Where can I found a tutorial, note or
    >> something where I can learn how to use poseAsClass: method inorder to
    >> make a thing like this?
    >> Thanks
    >> malcom
    >>
    >> On 10/10/06, Roger Persson <perrog...> wrote:
    >>> Now, is this for educational purpose or what exactly are you
    >>> planning to do?
    >>> Do you plan to globally change the system open and save dialogs for
    >>> all application, not just your application?

    How exactly do you propose to change dialog behaviour system-wide by
    using poseAsClass:? poseAsClass: doesn't work across process boundaries.
  • SIMBL could be a solution, I think.

    On 10/11/06, Mailing list subscriptions <ushootoo...> wrote:
    > El 10/10/2006, a las 20:25, Boyd Collier escribió:
    >
    >> Try Googling poseAsClass. The first hit I got looks like a good start.
    >>
    >> Boyd
    >>
    >>
    >> On Oct 10, 2006, at 10:31 AM, malcom wrote:
    >>
    >>> Thanks mike.
    >>> Ok it's for educational purpose and yes I would to try replace Open
    >>> and Save Dialogs in my system. Where can I found a tutorial, note or
    >>> something where I can learn how to use poseAsClass: method inorder to
    >>> make a thing like this?
    >>> Thanks
    >>> malcom
    >>>
    >>> On 10/10/06, Roger Persson <perrog...> wrote:
    >>>> Now, is this for educational purpose or what exactly are you
    >>>> planning to do?
    >>>> Do you plan to globally change the system open and save dialogs for
    >>>> all application, not just your application?
    >
    > How exactly do you propose to change dialog behaviour system-wide by
    > using poseAsClass:? poseAsClass: doesn't work across process boundaries.
    >
    >
    >
    >

    --
    www.malcom-mac.com - indipendent software developer
    mail: <malcom.mac...>
previous month october 2006 next month
MTWTFSS
            1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31          
Go to today