Okay, I don't do anything.

Hiedra

-----Mensaje original-----
De: Josh Tynjala <joshtynj...@bowlerhat.dev> 
Enviado el: martes, 10 de diciembre de 2024 18:54
Para: dev@royale.apache.org
Asunto: Re: Correction of warnings for incorrect type

I think that "!view" is generally fine, and it doesn't need to be changed.
Using ! to check if something is null is pretty commonly used in AS3. The only 
time it gets tricky is with numbers, where 0 is considered equivalent to false, 
but that's not something that you usually need to worry about.

--
Josh Tynjala
Bowler Hat LLC <https://bowlerhat.dev>


On Tue, Dec 10, 2024 at 3:12 AM Maria Jose Esteve <mjest...@iest.com> wrote:

> Ok, thx
>
> One question: what is more correct " view == null" or "!view"?
> The "!xxx" instruction is used very frequently (to check if xxx is 
> null) and I don't know if it should be changed to "xxx == null" or 
> "xxx === null"...
>
> Hiedra
>
> -----Mensaje original-----
> De: Yishay Weiss <yishayj...@hotmail.com> Enviado el: martes, 10 de 
> diciembre de 2024 11:32
> Para: dev@royale.apache.org
> Asunto: Re: Correction of warnings for incorrect type
>
> I would guess this was code taken from Flex which cannot be 
> implemented in full because function get gridViewLayout is not 
> implemented. I think you can just replace
>
> return view ;//&& view.gridViewLayout.isCellVisible(rowIndex, 
> columnIndex);
>
> with
>
> return view !=null;//&& view.gridViewLayout.isCellVisible(rowIndex,
> columnIndex);
>
> ________________________________
> From: Maria Jose Esteve <mjest...@iest.com>
> Sent: Tuesday, December 10, 2024 12:27 PM
> To: dev@royale.apache.org <dev@royale.apache.org>
> Subject: Correction of warnings for incorrect type
>
> Hi,
> I'm making some modifications to royale-asjs to fix the warnings:
> "incorrect type", "comparison between different types", etc, etc.
> I have a question about the Spark Grid component because I don't work 
> with mx/spark and I don't know what the best implementation would be.
> The warning occurs in the isCellVisible function [1]:
>
> Warning: GridView used where a Boolean value was expected.  The 
> expression will be type coerced to Boolean.
>
> public function isCellVisible(rowIndex:int = -1, columnIndex:int = 
> -1):Boolean
>         {
>             const view:GridView = getGridViewAt(rowIndex, columnIndex);
>             return view ;//&& 
> view.gridViewLayout.isCellVisible(rowIndex,
> columnIndex);
>         }
> [1]
> https://github.com/apache/royale-asjs/blob/0d87dd2f3324e793958211cb687
> 7facf62ee213a/frameworks/projects/SparkRoyale/src/main/royale/spark/co
> mponents/Grid.as#L4185
>
> ¿true/false?
>
> Thx.
>
> Hiedra
>
>

Reply via email to