SHOCKER! iTunes is made with RealBasic?

2»

Comments

  • Reply 21 of 40
    marcukmarcuk Posts: 4,442member
    Quote:
    Originally Posted by Chucker


    Because, uh, you neglected to give your app any functionality? iTunes has lots of complexity, from encoding and decoding to various forms of visualization to managing tens of thousands of database entries.



    yes i agree, but it isn't - or it shouldn't be doing any of that when I simply mousedown in the window (when im not on any button or option).



    Now, what I am saying - is whatever tool they've used to create the iTunes UI has an issue of maxing the CPU, when it should be executing nothing.



    Realbasic is one of the tools that has this unwanted behaviour with a certain class of UI control - EXACTLY the control you would HAVE to use if you wanted to make an iTunes style UI with RB - so it is possible that RB is the tool they've used to create this UI - regardless of whatever C++ libraries they've used for encoding or the fancy stuff, regardless of whatever other tools they have used. It is Possible that RB is the tool for the UI.



    This is what i am trying to find out.



    You do not know any more than I what they have used to create the UI. Period. You can guess as to what tools they have used, and they may be sensible, logical guesses, but at the end of the day you do not KNOW. I am suggesting, that because of the similarities in 'wierd' execution that iTunes and RB share, then it is Possible that RB was used to create the iTunes UI -which is precisely what you would use RB for and IMO would explain everything that is 'lame' about the iTunes UI.



    It is possible that i am completely wrong and it is just a coincidence, and there are other ways of achieving the same problem that have nothing to do with RB. That is fine. I can be wrong. But I am not going to modify my opinion and agree im wrong on the basis that you have made a guess (no better or worse than mine) as to what they did use.
  • Reply 22 of 40
    marcukmarcuk Posts: 4,442member
    Quote:
    Originally Posted by Kickaha


    I went and grabbed a couple of apps off of RealBasic's Showcase on their web site, and ran the executable through strings, then grepped for 'RB' in the output on a hunch. Hundreds of lines such as:



    Code:


    RBValArchive

    RBMailDB

    RBFilemakerAttachment

    RBFilemakerAttachment

    RBMailDB

    RBValArchive

    RBWhichMailboxes

    RBWhichMailboxes

    RBWhichMailboxes

    RBMailClient

    RBMailClient

    &RBMailClient_MouseEnter%%o<CCEmailApp>

    %RBMailClient_MouseExit%%o<CCEmailApp>

    RBMailClient_Open%%o<CCEmailApp>

    "RBMailClient_Action%%o<CCEmailApp>

    *RBWhichMailboxes_MouseExit%%o<CCMailboxes>

    +RBWhichMailboxes_MouseEnter%%o<CCMailboxes>

    %RBWhichMailboxes_Open%%o<CCMailboxes>

    RBMailDB_MouseExit%%o<CCExport>

    RBMailDB_Open%%o<CCExport>

    RBMailDB_MouseEnter%%o<CCExport>

    #RBValArchive_MouseExit%%o<CCExport>

    RBValArchive_Open%%o<CCExport>

    $RBValArchive_MouseEnter%%o<CCExport>

    ,RBFilemakerAttachment_MouseExit%%o<CCExport>

    'RBFilemakerAttachment_Open%%o<CCExport>

    -RBFilemakerAttachment_MouseEnter%%o<CCExport>

    Constructor%%o<RBMailDB>i4









    Then I did the same for iTunes 7. Here is the *complete* result:



    Code:


    kDRBurnStatusChangedNotification

    kDRBlockSizeKey

    kDRBlockTypeKey

    kDRBurnRequestedSpeedKey

    kDRBurnVerifyDiscKey

    kDRBurnAppendableKey

    kDRBurnCompletionActionKey

    kDRBurnCompletionActionMount

    kDRBurnTestingKey

    DRBurnCopyStatus

    DRBurnGetProperties

    DRBurnCreate

    DRBurnAbort

    DRBurnSetProperties

    DRBurnWriteLayout

    com_apple_driver_iPodRBCNub

    4RB>

    $]3cM8RBh

    %`RBp

    RB0

    XRBM

    P@RB

    vPGRB

    E5RB

    IY,<7'RB

    IY,<7'RB

    kHRBT

    Ja[BnRB

    o2RB

    pN2^LlRB|

    RBoo

    5RBV%VQH

    ?ulYRBv

    (RB.

    RB^L9









    Can we put a bullet through this one now?



    The behaviour you're seeing is because of a brain-dead wait loop. MacOS Toolbox had it, Classic has it, Carbon inherited it (and it still pops up sometimes), and just plain lazy programming will recreate it. It's nothing unique to RealBasic.



    Thankyou, its all I needed - iTunes is not made with RB.
  • Reply 23 of 40
    kickahakickaha Posts: 8,760member
    Too bad no one pointed that out before...



    Oh wait, Chucker *did*...



    Quote:
    Originally Posted by Chucker


    Yeah, all you really have to do is look through the binary's strings.







    Sheesh mon.



    'strings' is a very useful tool for poking around in the guts of apps. If you haven't already run across it, take a few minutes to read the man page, and it'll open your eyes up to a whole new world of playing with apps. It's usually the first thing I do when I want an idea of how an app works. Just looking at the names will generally point you in the right direction of what it's doing, which subsystems it's using to do them, etc, etc, etc. Good stuff. It's also fantastic for finding those 'hidden preferences' that people publish from time to time. Look for a string that would make sense for the name of a pref controlling what you want to change, and then plop it into defaults with various values to see if the behaviour changes.
  • Reply 24 of 40
    marcukmarcuk Posts: 4,442member
    Kickaha - can you briefly explain the process of how you did that. It would be interesting to look at some of my own compiled code to see whats in there.
  • Reply 25 of 40
    chuckerchucker Posts: 5,089member
    Quote:
    Originally Posted by MarcUK


    Realbasic is one of the tools that has this unwanted behaviour with a certain class of UI control



    And REALBasic was originally modelled after the Mac Toolbox, so not a huge surprise there.



    Quote:

    You do not know any more than I what they have used to create the UI. Period.



    They have used Carbon. Period. End of story. Just STOP.
  • Reply 26 of 40
    marcukmarcuk Posts: 4,442member
    ok ive stopped!



    now where do I find this string tool and this grep tool?
  • Reply 27 of 40
    chuckerchucker Posts: 5,089member
    Quote:
    Originally Posted by MarcUK


    ok ive stopped!



    now where do I find this string tool and this grep tool?



    In Terminal. Here's roughly what Kickaha did:



    Code:


    strings /Applications/iTunes.app/Contents/MacOS/iTunes | grep RB







    According to man strings:

    Quote:

    NAME

    strings - find the printable strings in a object, or other binary, file



    In other words, it takes all contents of a binary, removes those parts that aren't human-readable (i.e., unlikely to be text), and prints it out, one by one in a line each. So we do that on iTunes's binary. In a Mach-O application bundle, you'll find the binary in Contents/MacOS. Then, we pipe the results to grep:

    Quote:

    NAME

    grep, egrep, fgrep - print lines matching a pattern



    That pattern, in this case, is "RB". I.e., we look for strings inside the iTunes binary that contain the two letters "RB", both upper-case, in that order.
  • Reply 28 of 40
    marcukmarcuk Posts: 4,442member
    thankyou. As im not running OSX, do you know if something similar is possible in windows?
  • Reply 29 of 40
    chuckerchucker Posts: 5,089member
    Quote:
    Originally Posted by MarcUK


    thankyou. As im not running OSX, do you know if something similar is possible in windows?



    On Windows, I just wind up installing Cygwin and then doing the exact same. (Cygwin is a Unix emulation layer for Windows.)



    In Cygwin, the line would look something like:

    Code:


    strings /cygdrive/c/Program Files/iTunes/iTunes.exe | grep RB







    (Assuming iTunes is installed in c: \\Program Files\\iTunes)



    I could walk you through installing Cygwin, but frankly, it's fairly straightforward.
  • Reply 30 of 40
    brussellbrussell Posts: 9,812member
    Actually iTunes is made in Hypercard.
  • Reply 31 of 40
    marcukmarcuk Posts: 4,442member
    I guess what an app needs to do is start at the beginning of the code and look through all the characters that fall in the range of 'readable' letters in the ASCII code until the end. It would then show the readable characters in a listbox and reject the others.? How would you determine what an end of line/ or end of string was so that you didn't end up with one long list of readable characters?
  • Reply 32 of 40
    marcukmarcuk Posts: 4,442member
    Quote:
    Originally Posted by BRussell


    Actually iTunes is made in Hypercard.



    For a moment I thought it was AmigaBasic, but sensibilities got the better of me.
  • Reply 33 of 40
    chuckerchucker Posts: 5,089member
    Quote:
    Originally Posted by MarcUK


    I guess what an app needs to do is start at the beginning of the code and look through all the characters that fall in the range of 'readable' letters in the ASCII code until the end.



    Yup, that's what strings does.



    Quote:

    How would you determine what an end of line/ or end of string was so that you didn't end up with one long list of readable characters?



    You can set a minimum threshold of string length.
  • Reply 34 of 40
    marcukmarcuk Posts: 4,442member
    there is a better way...



    if the ascii parser finds that a character that follows a string of readable characters is not of 'readable' type, then that must be the end of the string no?



    and if the parser finds that at least 3 readable characters do not exist in sequence then it disregards the string? Is 3 a sensible number of readable characters to work with?
  • Reply 35 of 40
    chuckerchucker Posts: 5,089member
    Quote:
    Originally Posted by MarcUK


    if the ascii parser finds that a character that follows a string of readable characters is not of 'readable' type, then that must be the end of the string no?



    Yes.



    Quote:

    and if the parser finds that at least 3 readable characters do not exist in sequence then it disregards the string? Is 3 a sensible number of readable characters to work with?



    Again, just read the man page:



    Quote:

    A string is any sequence of 4 (the default) or more printing

    characters ending with a newline or a null.



  • Reply 36 of 40
    marcukmarcuk Posts: 4,442member
    Quote:
    Originally Posted by Chucker


    Yes.







    Again, just read the man page:



    um what is the man page.?



    Anyway, I have created a quick app that does what i think it should. You can check it out if you like. It seems to work - have looked at the strings in all kinds of things...But it takes longer to update the screen, the larger the file you look at, so i suggest you look at small things to start off with...It seemed to handle a 10MB PDF in about a minute. And DONT try to open a shortcut - I think it tries to resolve the path and look at the original file - which might be hell huge - I think Cinema4d is too big for this app!



    AND IN NO WAY AM I RESPONSIBLE IF THIS ENTIRELY BORKS YOUR COMPUTER.



    http://myweb.tiscali.co.uk/mysteries...rBudv0.01a.exe
  • Reply 37 of 40
    kickahakickaha Posts: 8,760member
    I was afraid you were going to ask what a man page is...



    'man' is a Unix command line tool, short for 'manual'. It gets you the documentation for command line tools on Unix. So 'man strings' would tell you how to run the strings program.



    You can almost always google for "man whateveryou'relookingfor" and get the man page through your web browser, just for future reference.



    Oh, and strings can parse and output the results from the 21MB iTunes app in.... oh, under a second? There's your performance target to shoot for.
  • Reply 38 of 40
    marcukmarcuk Posts: 4,442member
    Quote:
    Originally Posted by Kickaha


    I was afraid you were going to ask what a man page is...



    'man' is a Unix command line tool, short for 'manual'. It gets you the documentation for command line tools on Unix. So 'man strings' would tell you how to run the strings program.



    You can almost always google for "man whateveryou'relookingfor" and get the man page through your web browser, just for future reference.



    Oh, and strings can parse and output the results from the 21MB iTunes app in.... oh, under a second? There's your performance target to shoot for.



    hey, I managed iTunes (which is 14.5MB) on my 2.6Ghz PC in about 70 seconds. So i guess my code could do with some improvement!
  • Reply 39 of 40
    johnqjohnq Posts: 2,763member
    ==

    Mousedown on a blank part of the iTunes interface (in the store homepage, this is the bluey/grey bit) and SHOCK!!! my CPU spikes to 100% - even though probably there is no reason for this to happen UNLESS the iTunes interface is a CANVAS CONTROL from RealBasic!!!

    ==



    This was one of the most breathtakingly nonsensical leaps of logic I've seen this short of a George W. Bush speech...no offense.



    I'm glad it all got settled but, boy, was it a page turner...
  • Reply 40 of 40
    Quote:
    Originally Posted by MarcUK


    Mousedown on a blank part of the iTunes interface (in the store homepage, this is the bluey/grey bit) and SHOCK!!! my CPU spikes to 100% -



    Doesn't happen on my computers (2.0Ghz DP G5, 20" iMac Core Duo) with iTunes 7.0!



    However iTunes does spinloop when you click and hold the volume slider or playhead.
Sign In or Register to comment.