You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@royale.apache.org by Maria Jose Esteve <mj...@iest.com> on 2021/10/03 12:49:16 UTC

Modificación y Compilacion SDK

Hi all, I need your help once again....

Some time ago I created a ThreeCheckBox control, based on the Jewel CheckBox code, with a third "indeterminate" state (only for JS) [1]
I've been told that I can make a PR for review and later inclusion in the SDK but I'm having several problems. I have never implemented a control for the SDK and I don't know if I am doing it correctly?

[1] https://drive.google.com/file/d/1iEz1EZ8702jxhsTKwZPHqLInjY2w4Vr0/view?usp=sharing

The implementation consists of:

- Jewel ThreeCheckBox Jewel Control (org.apache.royale.jewel)

- Modification of the _checkbox.sass file of the Jewel project (Jewel/src/main/sass/components)

- Modification of the _checkbox.sass file of the JewelTheme project (JewelTheme/src/main/sass/components-primary)

- Created a new interface org.apache.royale.jewel.supportClasses.ISelectableWithIndeterminacy.

- Created two beads: ThreeCheckBoxLabelState and ThreeCheckBoxStatesValues (org.apache.royale.jewel.beads.controls.threecheckbox).



- Added ISelectableWithIndeterminacy interface to JewelClasses.as (Referencing CheckBox control and its associated beads)



        import org.apache.royale.jewel.supportClasses.ISelectableWithIndeterminacy; ISelectableWithIndeterminacy;




- Added ThreeCheckBox and the two beads to jewel-manifest.xml



<component id="ThreeCheckBox" class="org.apache.royale.jewel.ThreeCheckBox"/>
     <component id="ThreeCheckBoxLabelState" class="org.apache.royale.jewel.beads.controls.threecheckbox.ThreeCheckBoxLabelState"/>
     <component id="ThreeCheckBoxStatesValues" class="org.apache.royale.jewel.beads.controls.threecheckbox.ThreeCheckBoxStatesValues"/>


I have implemented this control in two different projects and in both of them it works without any problem:
- In a project of examples of the community "without sass" directly with CSS
- And in my main project where I have it implemented "with sass" (I have created a custom Theme).

When I passed the control, from my project to the SDK, for the first time, I couldn't compile with ant because the code was not correct for a SWF compilation.
After several modifications I chose to make it accessible only for JS and after that the ant compilation worked.
Now, I have another problem that I'm not able to solve... Like Jewel CheckBox or Switch, ThreeCheckBox uses CSS to assign the graphic according to the state it is in (checked/selected, unchecked/normal, indeterminated) which I have implemented in _checkbox.sass but it DOES NOT GET IT, only the "selected"/"unselected" is rendered correctly.

I guess it's difficult to know what's going on without seeing the code but I didn't want to send the PR until it doesn't work...

What could be going on, am I missing something? I realise that maybe the implementation isn't the best but I'll leave this for when it "works" 😝.

Any comments are welcome 😝

Thx.
Hiedra