[Bloc] A mobile device using Bloc

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

[Bloc] A mobile device using Bloc

Glenn Cavarlé
Hi,

Just a new example using Bloc.



Sources at: http://smalltalkhub.com/#!/~GlennCavarle/SomeBlocExamples


Main identified issues :
- in major cases, a BlElement must have a BlLinearLayoutParams to work well
- margin and padding work only with BlLinearLayoutParams
- stroke's width is not included in the inner bounds (already mentioned in a previous post)
- some problems with alignment in specific cases
- no SVG support

I will try to solve them soon.

Cheers,
Glenn Cavarlé
Reply | Threaded
Open this post in threaded view
|

Re: [Bloc] A mobile device using Bloc

Aliaksei Syrel
Nice example! :)

I thought that phone itself is picture but after looking at code realized that it is actually completely vector graphics!

You identified a few encountered issues. Could you describe them in more details and explain why the yare issues for you?

For example, why you see an issue that padding and margin only work with BlLinearLayoutParams? (maybe you mistyped, margin and padding work only depending on layout. they only  make sense to some spefici layouts)
- in major cases, a BlElement must have a BlLinearLayoutParams to work well
- margin and padding work only with BlLinearLayoutParams

- stroke's width is not included in the inner bounds (already mentioned in a previous post) 
Indeed. However, this is a general problem in vector graphics. Interesting reading: http://tavmjong.free.fr/blog/?p=1257.
 
- some problems with alignment in specific cases
Maybe a bug. Could you post an example?

 - no SVG support
Exactly, it is not implemented ;)

Thanks, keep it up!

Cheers,
Alex

On Tue, Mar 29, 2016 at 10:34 AM, Glenn Cavarlé <[hidden email]> wrote:
Hi,

Just a new example using Bloc.

<http://forum.world.st/file/n4887079/bloc-mobile.png>

Sources at:  http://smalltalkhub.com/#!/~GlennCavarle/SomeBlocExamples
<http://smalltalkhub.com/#!/~GlennCavarle/SomeBlocExamples>


*Main identified issues :*
- in major cases, a BlElement must have a BlLinearLayoutParams to work well
- margin and padding work only with BlLinearLayoutParams
- stroke's width is not included in the inner bounds (already mentioned in a
previous post)
- some problems with alignment in specific cases
- no SVG support

I will try to solve them soon.

Cheers,




-----
Glenn Cavarlé
--
View this message in context: http://forum.world.st/Bloc-A-mobile-device-using-Bloc-tp4887079.html
Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.


Reply | Threaded
Open this post in threaded view
|

Re: [Bloc] A mobile device using Bloc

abergel
In reply to this post by Glenn Cavarlé
Excellent!!!!!

Go go go!
Alexandre
-- 
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.



On Mar 29, 2016, at 5:34 AM, Glenn Cavarlé <[hidden email]> wrote:

Hi,

Just a new example using Bloc.

<http://forum.world.st/file/n4887079/bloc-mobile.png>

Sources at:  http://smalltalkhub.com/#!/~GlennCavarle/SomeBlocExamples
<http://smalltalkhub.com/#!/~GlennCavarle/SomeBlocExamples>  


*Main identified issues :*
- in major cases, a BlElement must have a BlLinearLayoutParams to work well
- margin and padding work only with BlLinearLayoutParams
- stroke's width is not included in the inner bounds (already mentioned in a
previous post)
- some problems with alignment in specific cases
- no SVG support

I will try to solve them soon.

Cheers,




-----
Glenn Cavarlé
--
View this message in context: http://forum.world.st/Bloc-A-mobile-device-using-Bloc-tp4887079.html
Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.


Reply | Threaded
Open this post in threaded view
|

Re: [Bloc] A mobile device using Bloc

Glenn Cavarlé
In reply to this post by Aliaksei Syrel
Hi Alex,
The alignment problem was a mistake, i just needed a "BlLinearLayout vertical" to allow horizontal alignment.
I committed the BlMobileTests class which contains encountered issues.
Warning, some tests crash the image...

Cheers,
Glenn.
Glenn Cavarlé
Reply | Threaded
Open this post in threaded view
|

Re: [Bloc] A mobile device using Bloc

Aliaksei Syrel
Aha! :)

FrameLayout never worked so... It is on todo list after grid layout.

Also there is a rule of how layouts and layout properties are bounded together:
All children of an element with XYZLayoutStrategy must have XYZLayoutParams.

It is allowed to have an element with ABC layout strategy and XYZ layout params.

Cheers,
Alex

On Tue, Mar 29, 2016 at 6:51 PM, Glenn Cavarlé <[hidden email]> wrote:
Hi Alex,
The alignment problem was a mistake, i just needed a "BlLinearLayout
*vertical*" to allow horizontal alignment.
I committed the BlMobileTests class which contains encountered issues.
Warning, some tests crash the image...

Cheers,
Glenn.



-----
Glenn Cavarlé
--
View this message in context: http://forum.world.st/Bloc-A-mobile-device-using-Bloc-tp4887079p4887230.html
Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.


Reply | Threaded
Open this post in threaded view
|

Re: [Bloc] A mobile device using Bloc

Glenn Cavarlé
Aliaksei Syrel wrote
Aha! :)

FrameLayout never worked so... It is on todo list after grid layout.
Ah ok ! My bad... Do you know why image crashes instead of throwing an error?

Aliaksei Syrel wrote
Also there is a rule of how layouts and layout properties are bounded
together:
*All children of an element with XYZLayoutStrategy must have
XYZLayoutParams.*

It is allowed to have an element with ABC layout strategy and XYZ layout
params.
Hum, it seems to be a little error prone, would it not be interesting to merge layout params ? 1 class but several traits as you have already begun to do ?

Do you have any ideas for implementing SVG support ? I found no way to implement it at the path level, so i think that we need a special shape to do that.
But, having an SVG shape forces us to delegate the drawing to the shape because it is not the same drawing strategy as "normal" shapes.

Glenn.

Glenn Cavarlé