Jump to content
Sign in to follow this  
jarto

Smart 2.9.9 [alpha] is here!

Recommended Posts

At this point documentation for all the new features is missing. So please do ask anything and I'll do my best to help you. To learn to use the new TabControl, Listbox and scrolling features, have a look at the project: "Tabs, Scrolling and ListBox", which can be found in the Featured Demos\Forms & Components -folder.

 

And as we now can use the powerful SmartUpdate -program to offer updates as frequently as needed, we can also fix bugs fast. So just let us know and we'll get to it. In the meantime, we'll continue perfecting the styling.

Share this post


Link to post
Share on other sites

> There's also a post about the new EventManager:

 

I suggest to add this to help itself or SMS website.

 

Few questions about it:

 

1) To use EventManager is it enough to just include SmartCL.EventManager or we actually need to create one EventManager per form?

 

2a) What if I want to handle same event on several places, on label, then on panel etc? It's easy to do so in JS, but from your article on Facebook group it seems that propagating same event to parent control will not work, it would stop at label since it has "touch or movement related events on the control. For example: OnClick or OnMouseDown".

 

2b) Article also suggest it would stop at first label if it has any kind of related event (Click for example). What if I want to handle onMouseUp in parent and OnClick in label (two different events)?

Share this post


Link to post
Share on other sites

1. The RTL creates the EventManager automatically at startup. You don't need to create it yourself. There is only one EventManager per project. It listens to events on Display-level.

 

2. If you want to handle the same event on several places, there are ways to do that:

- You can listen to it on the child element and call the panel from there, like you'd do in Delphi.

- You can also hook up to Javascript events like before. We have not prevented you from doing that.

Share this post


Link to post
Share on other sites

Glad to see you're working on SMS but I didn't see any mention to the compiler itself. You know I'm having some issues with it...

Please send e-mail about these to support at smartmobilestudio.com

We're probably going to be busy with changes to styling for some 1-2 weeks, though. But we'll get there!

Share this post


Link to post
Share on other sites

New updates to the alpha-version:

 

- New controls and classes:

- TW3GroupBox

- TW3RadioButton

- TStringStream

- Improvements to Game View initialization

- Added overloaded ShowDialog with custom width and height

- Fixed Contest Demos:

- RetroBalls

- PolyDna

- Afternoon Walk

- GraphicsDemo

 

You get these by running SmartUpdate.exe in the folder where you installed the Alpha.

Share this post


Link to post
Share on other sites

More updates available with SmartUpdate:

 

7.10.2017

 

Improvements to resizing:

- Fix wrong display height on iOS/Chrome after device flip

- Reduce number of resizes during startup

 

5.10.2017

 

New controls:

- TW3RadioGroup

- TW3MediaPlayer

Support for WebFonts

Styling changes to TW3ScrollControl's background

EventManager to send OnClick through CBClick

Bug fixes to the RTL

Bug fixes to the IDE

Share this post


Link to post
Share on other sites

I did not add it to the component palette yet as there are no docs and examples about it. I'm also waiting for Jon to make an example once he's done with the styling.

 

So at the moment you can test it by adding SmartCL.Controls.Mediaplayer to the uses clause and creating the components in code. But your guess is as good as mine when it comes to using it.

Share this post


Link to post
Share on other sites

yeah, well, I gave it a go and all i ever get is "Media not supported errors". I tried all kinds of configurations

 

<p>

unit Form1;

 

interface

 

uses

SmartCL.System, SmartCL.Graphics, SmartCL.Components, SmartCL.Forms,

SmartCL.Fonts, SmartCL.Borders, SmartCL.Application, SmartCL.Controls.Memo,

SmartCL.Controls.RadioGroup, SmartCL.Controls.Panel, SmartCL.Controls.MediaPlayer;

 

type

TForm1 = class(TW3Form)

private

{$I 'Form1:intf'}

MP: TW3MediaPlayer;

Memo: TW3Memo;

procedure HandlePlay(Sender: TObject);

procedure HandlePlaying(Sender: TObject);

procedure HandleCanPlay(Sender: TObject);

procedure HandleProgress(Sender: TObject);

procedure HandleAudioAvailable(Sender: TObject);

procedure HandleMediaError (Sender: TObject; Err: TW3MediaError);

procedure HandleLoadStart(Sender: TObject);

procedure HandleLoadedData(Sender: TObject);

protected

procedure InitializeForm; override;

procedure InitializeObject; override;

procedure ObjectReady;override;

procedure Resize; override;

end;

 

implementation

 

{ TForm1 }

 

procedure TForm1.HandlePlay(Sender: TObject);

begin

Memo.Add('Play...');

End;

 

procedure TForm1.HandlePlaying(Sender: TObject);

begin

Memo.Add('Playing...');

End;

 

procedure TForm1.HandleCanPlay(Sender: TObject);

begin

Memo.Add('Can Play!');

End;

 

procedure TForm1.HandleProgress(Sender: TObject);

begin

Memo.Add('.');

End;

 

procedure TForm1.HandleAudioAvailable(Sender: TObject);

begin

Memo.Add('Audio Available!');

End;

 

procedure TForm1.HandleLoadStart(Sender: TObject);

begin

Memo.Add('Data Loading...');

End;

 

procedure TForm1.HandleLoadedData(Sender: TObject);

begin

Memo.Add('Data Loaded!');

End;

 

procedure TForm1.HandleMediaError (Sender: TObject; Err: TW3MediaError);

begin

Memo.Add(Err.message);

end;

 

 

procedure TForm1.InitializeForm;

begin

inherited;

// this is a good place to initialize components

end;

 

procedure TForm1.InitializeObject;

begin

inherited;

{$I 'Form1:impl'}

Memo:= TW3Memo.Create(self);

 

MP:= TW3MediaPlayer.Create(self);

MP.CanPlayType('video/mp4');

MP.OnPlay:= HandlePlay;

MP.OnPlaying:= HandlePlaying;

MP.OnLoadStart:= HandleLoadStart;

Mp.OnLoadedData:= HandleLoadedData;

MP.OnCanPlay:= HandleCanPlay;

MP.OnProgress:= HandleProgress;

MP.OnAudioAvailable:= HandleAudioAvailable;

MP.OnError:= HandleMediaError;

end;

 

procedure TForm1.ObjectReady;

begin

inherited;

Mp.Load('res\test.mp4');

Mp.Play;

end;

 

procedure TForm1.Resize;

begin

inherited;

MP.SetBounds(0,0,width,height Div 2);

Memo.SetBounds(0, height Div 2, width, height);

end;

 

initialization

Forms.RegisterForm({$I %FILE%}, TForm1);

end.

</p>

Share this post


Link to post
Share on other sites

Mp.Load('res\test.mp4');

 

With all file names, always use / instead of \

I haven't had time to test that one, but this is the same issue that happened with the backgrounds.

Share this post


Link to post
Share on other sites

Yes, I did test that and it did not make a difference

 

 

 

Mp.Load('res\test.mp4');With all file names, always use / instead of \I haven't had time to test that one, but this is the same issue that happened with the backgrounds.

 

Share this post


Link to post
Share on other sites

Yes, I did test that and it did not make a difference

 

 

 

Mp.Load('res\test.mp4');With all file names, always use / instead of \I haven't had time to test that one, but this is the same issue that happened with the backgrounds.

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×