f.Printf(""); // Make the stream point to where the editbox is
}
+static int64 GetI64EnumValue(Class dataType, DataValue dataForm)
+{
+ int64 i64Value = 0;
+ switch(dataType.typeSize)
+ {
+ case 1:
+ if(!strcmp(dataType.dataTypeString, "byte"))
+ i64Value = dataForm.uc;
+ else
+ i64Value = dataForm.c;
+ break;
+ case 2:
+ if(!strcmp(dataType.dataTypeString, "uint16"))
+ i64Value = dataForm.us;
+ else
+ i64Value = dataForm.s;
+ break;
+ case 4:
+ if(!strcmp(dataType.dataTypeString, "uint"))
+ i64Value = dataForm.ui;
+ else
+ i64Value = dataForm.i;
+ break;
+ case 8:
+ if(!strcmp(dataType.dataTypeString, "uint64"))
+ i64Value = *(int64 *)&dataForm.ui64;
+ else
+ i64Value = dataForm.i64;
+ break;
+ }
+ return i64Value;
+}
+
void Code_FixProperty(Property prop, Instance object)
{
Designer::FixProperty(prop, object);
int oldLine = lastLine;
display.FontExtent(font.font, " ", 1, null, &spaceH);
{
- Box box { 0, (Min(oldLine,oldLine)-1) * spaceH - editBox.scroll.y, editBox.anchor.left.distance, (Max(oldLine, oldLine))*spaceH-1 - editBox.scroll.y };
+ Box box { 0, (oldLine-1) * spaceH - editBox.scroll.y, editBox.anchor.left.distance, oldLine*spaceH-1 - editBox.scroll.y };
Update(box);
}
{
- Box box { 0, (Min(line,line)-1) * spaceH - editBox.scroll.y, editBox.anchor.left.distance, (Max(line, line))*spaceH-1 - editBox.scroll.y };
+ Box box { 0, (line-1) * spaceH - editBox.scroll.y, editBox.anchor.left.distance, line*spaceH-1 - editBox.scroll.y };
Update(box);
}
lastLine = line;
SetTargetBits(ide.workspace.bitDepth ? ide.workspace.bitDepth : GetHostBits());
delete compiler;
}
- this.privateModule = __ecere_COM_Initialize(false | ((GetTargetBits() == sizeof(uintptr) *8) ? 0 : GetTargetBits() == 64 ? 2 : 4), 1, null);
+ this.privateModule = __ecere_COM_Initialize((bool)(false | ((GetTargetBits() == sizeof(uintptr) *8) ? 0 : GetTargetBits() == 64 ? 2 : 4)), 1, null);
SetPrivateModule(privateModule);
int bitDepth = ide.workspace.bitDepth;
DirExpression objDir = project.GetObjDir(compiler, config, bitDepth);
SetSymbolsDir(objDir.dir);
+ SetDefaultNameSpace(project.GetDefaultNameSpace(config));
ide.SetPath(true, compiler, config, bitDepth);
delete objDir;
}
else
{
- switch(GetRuntimePlatform())
+ switch(__runtimePlatform)
{
case win32: SetSymbolsDir("obj/debug.win32"); break;
case tux: SetSymbolsDir("obj/debug.linux"); break;
}
SetIncludeDirs(null);
SetSysIncludeDirs(null);
+ SetDefaultNameSpace(null);
}
{
{
Map<String, bool> i18nStrings = object.i18nStrings;
bool i18n = true;
- if(i18nStrings && i18nStrings.GetAtPosition(prop.name, false))
+ if(i18nStrings && i18nStrings.GetAtPosition(prop.name, false, null))
i18n = false;
f.Printf("%s\"", i18n ? "$" : "");
if((prop.IsSet && !prop.IsSet(test)) || ((int (*)(void *, void *, void *))(void *)dataType._vTbl[__ecereVMethodID_class_OnCompare])(dataType, &dataForm, &dataTest))
{
- char * string;
+ char * string = null;
char tempString[1024] = "";
SetProperty(prop, test, dataForm);
if(dataType.type == enumClass)
{
- NamedLink value;
+ NamedLink64 value;
Class enumClass = eSystem_FindClass(privateModule, "enum");
EnumClassData e = ACCESS_CLASSDATA(dataType, enumClass);
+ int64 i64Value = GetI64EnumValue(dataType, dataForm);
for(value = e.values.first; value; value = value.next)
{
- if((int)value.data == dataForm.i)
+ if(value.data == i64Value)
{
string = value.name;
break;
{
Class dataType = prop.dataTypeClass;
char tempString[1024] = "";
- char * string;
+ char * string = null;
bool specify = false;
DataMember member;
if(((int (*)(void *, void *, void *))(void *)dataType._vTbl[__ecereVMethodID_class_OnCompare])(dataType, dataForm, dataTest))
{
char tempString[1024] = "";
- char * string;
+ char * string = null;
((void (*)(void *, void *))(void *)prop.Set)(test, dataForm);
if(eClass_IsDerived(classObject.instance._class, dataType) && classObject.instance == dataForm)
{
Map<String, bool> i18nStrings = classObject.i18nStrings;
bool i18n = true;
- if(i18nStrings && i18nStrings.GetAtPosition(prop.name, false))
+ if(i18nStrings && i18nStrings.GetAtPosition(prop.name, false, null))
i18n = false;
f.Printf("\n %s%s = %s\"", specify ? "property::" : "", prop.name, i18n ? "$" : "");
bool needClass = true;
if(dataType.type == enumClass)
{
- NamedLink value;
+ NamedLink64 value;
Class enumClass = eSystem_FindClass(privateModule, "enum");
EnumClassData e = ACCESS_CLASSDATA(dataType, enumClass);
+ int64 i64Value = GetI64EnumValue(dataType, dataForm);
for(value = e.values.first; value; value = value.next)
{
- if((int)value.data == dataForm.i)
+ if(value.data == i64Value)
{
string = value.name;
break;
if(subMember.dataType && subMember.dataType.kind == classType && subMember.dataType._class)
{
- char * bitmapName = (char *)eClass_GetProperty(subMember.dataType._class.registered, "icon");
+ char * bitmapName = (char *)(intptr)eClass_GetProperty(subMember.dataType._class.registered, "icon");
if(bitmapName)
{
bitmap = { bitmapName };
if(member.dataType && member.dataType.kind == classType && member.dataType._class)
{
- char * bitmapName = (char *)eClass_GetProperty(member.dataType._class.registered, "icon");
+ char * bitmapName = (char *)(intptr)eClass_GetProperty(member.dataType._class.registered, "icon");
if(bitmapName)
{
bitmap = { bitmapName };
if(member.dataType && member.dataType.kind == classType && member.dataType._class)
{
- char * bitmapName = (char *)eClass_GetProperty(member.dataType._class.registered, "icon");
+ char * bitmapName = (char *)(intptr)eClass_GetProperty(member.dataType._class.registered, "icon");
if(bitmapName)
{
bitmap = { bitmapName };
for(_class : classes)
{
EnumClassData enumeration = (EnumClassData)_class.data;
- NamedLink item;
+ NamedLink64 item;
for(item = enumeration.values.first; item; item = item.next)
{
DataRow row = membersList.AddString(item.name);
for(link = (BTNamedLink)nameSpace.classes.first; link; link = (BTNamedLink)((BTNode)link).next)
{
Class _class = link.data;
- if(_class.type == enumClass && (dest.kind != classType || ((!dest._class || !dest._class.registered || (dest._class.registered != _class && strcmp(dest._class.registered.dataTypeString, "char *"))) && !dest.classObjectType)) &&
+ if(_class.type == enumClass && (dest.kind != classType || ((!dest._class || !dest._class.registered || (dest._class.registered != _class && strcmp(dest._class.registered.dataTypeString, "char *") && strcmp(dest._class.string, "bool"))) && !dest.classObjectType)) &&
dest.kind != pointerType && dest.kind != ellipsisType)
{
OldList conversions { };
}
else if(destType && destType.kind == enumType)
{
- NamedLink value;
+ NamedLink64 value;
for(value = destType.members.first; value; value = value.next)
{
BitmapResource bitmap = null;
if(symbol.type && symbol.type.kind == classType && symbol.type._class && symbol.type._class)
{
- char * bitmapName = (char *)eClass_GetProperty(symbol.type._class.registered, "icon");
+ char * bitmapName = (char *)(intptr)eClass_GetProperty(symbol.type._class.registered, "icon");
if(bitmapName)
{
bitmap = { bitmapName };
int rowCount;
char tempString[1024];
char * string = null;
- CodePosition idStart, idEnd;
+ CodePosition idStart { };
+ CodePosition idEnd { };
if(membersListShown)
{
}
string[len] = 0;
*/
- int x, y;
+ int x = 0, y;
int len = 0;
EditLine editLine = editBox.line;
bool firstChar = true;