Jump to content


Photo

Mobile Form TitleButtons - Change Button Text at Runtime - How ?

TitleButtons

  • Please log in to reply
16 replies to this topic

#1 andyhill

andyhill

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 337 posts
  • LocationMelbourne Australia

Posted 16 May 2018 - 01:51 AM

I have 4 TitleButtons on a MobileForm.

 

My code below fails (I have tried ButtonID as well), please advise how to change button text at runtime - Thanks

 

          case Mode of
            0: TitleButtons[1].Caption:= 'Auto';
            1: TitleButtons[1].Caption:= 'Odd';
            2: TitleButtons[1].Caption:= 'Even';
          else
            TitleButtons[1].Caption:= 'Auto';
          end;
          UniSession.Synchronize;
 

  • 0

Andy


#2 Delphi Developer

Delphi Developer

    Advanced Member

  • Moderators
  • 4754 posts

Posted 16 May 2018 - 10:04 AM

Hi,

 

Reported to support portal,

 

Try this approach for now:

UniSession.AddJS(TitleButtons[0].JSName + '.setText("newCaption")')

  • 0

#3 andyhill

andyhill

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 337 posts
  • LocationMelbourne Australia

Posted 16 May 2018 - 08:14 PM

Thanks however .JSName is an undeclared identifier when it comes to TitleButtons ?


  • 0

Andy


#4 Delphi Developer

Delphi Developer

    Advanced Member

  • Moderators
  • 4754 posts

Posted 17 May 2018 - 02:10 AM

Sorry, which build are you using?
  • 0

#5 andyhill

andyhill

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 337 posts
  • LocationMelbourne Australia

Posted 17 May 2018 - 06:11 AM

  // Sencha Touch Runtime
  ExtRoot:=       UniServerModule.StartPath+'ext-4.2.5.1763\';
  UniRoot:=       UniServerModule.StartPath+'uni-1.0.0.1423\';
  UniMobileRoot:= UniServerModule.StartPath+'unim-1.0.0.1423\';
  TouchRoot:=     UniServerModule.StartPath+'touch-2.4.2\';
 
I am hesitant to update because this is a live system (built around touch) and there have been so many new issues introduced with the latest updates.

  • 0

Andy


#6 andyhill

andyhill

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 337 posts
  • LocationMelbourne Australia

Posted 19 May 2018 - 07:51 PM

Please show me a work around


  • 0

Andy


#7 Delphi Developer

Delphi Developer

    Advanced Member

  • Moderators
  • 4754 posts

Posted 19 May 2018 - 08:03 PM

Hi,

 

Please show me a work around

 

Can you try the approach, as in your "post"?:

http://forums.unigui...ent/#entry52113


  • 0

#8 andyhill

andyhill

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 337 posts
  • LocationMelbourne Australia

Posted 19 May 2018 - 08:21 PM

As stated before:-

 

.titlebar.getAt(...).setText

 

Is not a function.

 

UniGUI ver 1423


  • 0

Andy


#9 Delphi Developer

Delphi Developer

    Advanced Member

  • Moderators
  • 4754 posts

Posted 19 May 2018 - 08:43 PM

Ok, we will check


  • 0

#10 andyhill

andyhill

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 337 posts
  • LocationMelbourne Australia

Posted 19 May 2018 - 09:49 PM

I have finally updated to 1.10.0.1458 on Delphi 10.2 (Tokyo)

 

Installed in the following order:-

 

Complete Professional

Complete Runtime

Documentation

Theme Pack

 

Ran Delphi and App 

 

NOTHING WORKS AS BEFORE

 

I NEED URGENT HELP VIA REMOTE ACCESS 

 

PLEASE HELP ASAP


  • 0

Andy


#11 Farshad Mohajeri

Farshad Mohajeri

    Administrator

  • Administrators
  • 10245 posts

Posted 19 May 2018 - 11:12 PM

Have you rebuilt unigui packages?

Also what do you mean by saying nothing is working?

Sent from my SM-N950F using Tapatalk
  • 0

#12 Farshad Mohajeri

Farshad Mohajeri

    Administrator

  • Administrators
  • 10245 posts

Posted 19 May 2018 - 11:21 PM

I have finally updated to 1.10.0.1458 on Delphi 10.2 (Tokyo)

 

Installed in the following order:-

 

Complete Professional

Complete Runtime

Documentation

Theme Pack

 

Ran Delphi and App 

 

NOTHING WORKS AS BEFORE

 

I NEED URGENT HELP VIA REMOTE ACCESS 

 

PLEASE HELP ASAP

 

If you have jumped directly from 1426 to 1458 then you must analyze your app carefully. Version 1.10.0.1458 is a major update with a whole new version of Ext JS library 6.5.

Probably you'll need to start from your MainForm and continue checking all of your other forms one by one.  Until you have a stable version of your app with 1458 you must keep your production version with build 1426.


  • 0

#13 andyhill

andyhill

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 337 posts
  • LocationMelbourne Australia

Posted Yesterday, 06:19 AM

I see no Mobile Theme and therefore all mobile components fail to render in mobile on iPhone X ? Grids do not even paint ? Using TouchTheme ios makes absolutely no difference.

 

I chose UniGUI Mobile Touch Professional to develop for mobile touch now mobile touch appears to be gone ?

 

I do not want to jam a desktop layout into a mobile phone via scaling.

 

You cannot say a perfectly working app can go from working great to non functioning on every level due to the update saying my programming is the cause.


  • 0

Andy


#14 andyhill

andyhill

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 337 posts
  • LocationMelbourne Australia

Posted Yesterday, 06:23 AM

And for the record

 

C:\Program Files (x86)\FMSoft\Framework\uniGUI\Source\Core\PNGImage will not compile on Tokyo 10.2 a problem I mentioned before but ignored.


  • 0

Andy


#15 Farshad Mohajeri

Farshad Mohajeri

    Administrator

  • Administrators
  • 10245 posts

Posted Yesterday, 12:21 PM

I see no Mobile Theme and therefore all mobile components fail to render in mobile on iPhone X ? Grids do not even paint ? Using TouchTheme ios makes absolutely no difference.

 

I chose UniGUI Mobile Touch Professional to develop for mobile touch now mobile touch appears to be gone ?

 

I do not want to jam a desktop layout into a mobile phone via scaling.

 

You cannot say a perfectly working app can go from working great to non functioning on every level due to the update saying my programming is the cause.

 

First of all, can you test your setup is working? Can you confirm that uniGUI touch demos work on your dev machine?


  • 0

#16 andyhill

andyhill

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 337 posts
  • LocationMelbourne Australia

Posted Yesterday, 08:44 PM

Farshad, My main problem was a legacy assignment (LayoutConfig.Height) that previously was ignored but now acted on - sorry for my stressed posting.

 

Now with the latest build it is missing the Mobile Sencha Touch Theme that is urgently needed. As stated before it makes the website look like an installed iPhone App and users have become dependent upon it.

 

Your C:\Program Files (x86)\FMSoft\Framework\uniGUI\Source\Core\PNGImage code will not compile on Tokyo 10.2, please provide solution - thank you.


  • 0

Andy


#17 Farshad Mohajeri

Farshad Mohajeri

    Administrator

  • Administrators
  • 10245 posts

Posted Yesterday, 10:15 PM

Tokyo should not be compiling pngimage library. There must be a misconfiguration on your setup. Pngimage library is only for very old Delphi versions which don't have built-in png support.

Sent from my SM-N950F using Tapatalk
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users