Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sys improvements #40

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
5 changes: 3 additions & 2 deletions src/kits/sys/Component.sedona
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
**
** Component is the base class for all Sedona component classes.
**
@palette=false
class Component
extends Virtual
{
Expand Down Expand Up @@ -417,7 +418,7 @@ class Component
int loadAppComp(InStream in)
{
// meta
if (!in.readStr(name, 8)) return Err.nameTooLong
if (!in.readStr(name, nameLen)) return Err.nameTooLong
parent = in.readU2()
children = in.readU2()
nextSibling = in.readU2()
Expand Down Expand Up @@ -508,7 +509,7 @@ class Component

** Human name for this component which is unique
** within its parent (do not modify directly)
define int nameLen = 8
define int nameLen = 32
inline Str(nameLen) name

** Parent id or nullId if root App or unmounted (do not modify directly)
Expand Down
14 changes: 14 additions & 0 deletions src/kits/sys/Note.sedona
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
//
// Copyright (c) 2016 Andrey Skvortsov <[email protected]>
// Licensed under the Academic Free License version 3.0
//

**
** Note is a component used to comment user application
**
class Note
extends Component
{
@asStr @summary=true @multiLine=true
@config property Buf(128) comment;
}
2 changes: 1 addition & 1 deletion src/sedona/src/sedona/Component.java
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ public static void assertName(String name)
*/
public static String checkName(String name)
{
if (name.length() > 7) return "nameTooLong";
if (name.length() > 31) return "nameTooLong";
if (name.length() == 0) return "nameEmpty";
for (int i=0; i<name.length(); ++i)
{
Expand Down
2 changes: 1 addition & 1 deletion src/sedona/src/sedona/dasp/DaspMsg.java
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ protected void doDecode(byte[] buf, final int length) throws UnsupportedEncoding
case RECEIVE_TIMEOUT: receiveTimeout = u2 * 1000L; break;
case ERROR_CODE: errorCode = u2; break;
case PLATFORM_ID: platformId = str; break;
default: throw new IllegalStateException("Unknown field id: " + id);
default: System.out.println("WARNING: Unknown field id: " + id);
}
}

Expand Down