How to replace legacy NewPicture

  1. 3 years ago

    Marc v

    8 Apr 2017 The Netherlands (Limburg)

    A time ago I bought a license for BensListboxExtras (Xojo subclass) from Ben Blake.
    This is a realy great listbox. Thanks to Ben for creating this.

    It is part of my app for years now. The xojo change of newpicture to new picture results in an error in Xojo2016R4 and 2017R1.
    This error is located in the decrypted part of the code. I think it is simple to solve, but I do not have the rights and password to edit the encrypted part.

    Ben Blake is possible not supporting it anymore since the latest version in 2010.
    A few days ago tried to contact Ben by mail. No answer yet. Maybe I do have an old mailaccount.

    Is anyone in contact with Ben? Maybe you can ask him to contact me.
    Or does anybody know if there is someone else supporting this subclass?

  2. Dave S

    8 Apr 2017 Answer San Diego, California USA

    this MIGHT fix it for you.
    add this to a global module in your project

    Public Function newPicture(width as integer,height as integer,depth as integer=-1) as picture
      If depth>0 Then 
        Return New picture(width,height,depth)
        Return New picture(width,height)
      End If
    End Function

    I have NOT tested this... but it might override the old code, and use this function instead.
    worth a shot

  3. Marc v

    8 Apr 2017 The Netherlands (Limburg)

    Thank you. So simple. Shame on me, i didn't think about it

  4. Dave S

    8 Apr 2017 San Diego, California USA

    Seeing as how that worked (I assume), why don't you change the title of this topic to something like "How to replace legacy NewPicture" or something.... this way it might help others in the future for other situations :)

  5. Marc v

    8 Apr 2017 The Netherlands (Limburg)

    I agree!
    thanks a lot!

  6. Peter F

    9 Apr 2017 Xojo Pro New England

    Find "NewPicture" and replace with "New Picture".

  7. Marc v

    9 Apr 2017 The Netherlands (Limburg)

    Most times replace will work.And it is faster!

    In this case the code is in a password decrypted part. The password is not available. Now this method fixes the problem.

  8. Peter F

    9 Apr 2017 Xojo Pro New England

    I figured there was something I hadn't considered. Good answer @Dave S :)

  9. Dave S

    9 Apr 2017 San Diego, California USA

    there is no "Z", but thanks :)

  10. 6 months ago

    Peter Fargo....

    I wish I had seen you post earlier re Find "NewPicture" and replace with "New Picture".
    I wasted a couple days farting around with other fixes.,.rapidly going backwards.

    tried this, and Viola, i was back in business. I have about 9 old apps that i have to move to 64 bits,
    and they all have this. you are a sanity saver
    Jake scheele

  11. Emile S

    22 Nov 2019 Europe (France, Strasbourg)


    just in case you forgot, there is a Language Reference embedded and another online that you can read… ;)

    Yes Man ! This is a joke.

    Real answer: do not waste your time. If you do not find your answer in a short delay, simply ask here (sometimes it takes unusual long time to reach the answer on the LR)…

  12. Norman P

    22 Nov 2019 Testers, Xojo Pro outside LMAO !!!!!!!

    make an effort to help yourself before you ask by reading the docs

or Sign Up to reply!