Jump to content

Smart 2.9.9 [alpha] is here!


Recommended Posts

  • Administrators

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.

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)?

Link to post
Share on other sites
  • Administrators

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.

Link to post
Share on other sites
  • Administrators

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!

Link to post
Share on other sites
  • Administrators

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.

Link to post
Share on other sites
  • 2 weeks later...
  • Administrators

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

Link to post
Share on other sites
  • Administrators

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.

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>

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...