Shorten a label string by Unicode character count and append an ellipsis when it exceeds a limit.
Cocos2d-x Lua Label Wrapping with Bounded Width and UTF-8 Fallback
Set bounded Label dimensions for automatic wrapping in Cocos2d-x Lua, with a UTF-8-aware manual line-breaking fallback for specialized layouts.
Fix Xcode Argument Value 10880 Is Outside the Valid Range
Fix the Xcode error Argument value 10880 is outside the valid range after a macOS or Xcode upgrade by tracing incompatible macros in an older Cocos project.
Lua Threads and Independent States: lua_newthread, resume and yield
Learn cooperative Lua threads within one state, lua_newthread, lua_resume and lua_yield lifecycle rules, plus independent states for isolation and ownership.
Xcode Paths and Debugging Tools: DerivedData, Simulators, Leaks and Zombies
Find Xcode DerivedData, archives, simulator data, and provisioning profiles on macOS, then diagnose memory leaks, zombie objects, and multiple installations.
Lua C Module Resource Management: Full Userdata, __gc and Safe Close
Wrap native handles in Lua full userdata, validate their metatable, implement an idempotent close method, and register __gc as a final cleanup fallback.
Lua C API Custom Type: Build a BitArray with Userdata and Metatables
Build a compact BitArray custom type with the Lua C API, including userdata storage, bit operations, index validation, metatables, and Lua-style access.
Lua C API Function Techniques: Arrays, Strings, Registry and Upvalues
Write robust Lua C functions with integer-indexed arrays, validated strings, stack discipline, and persistent state stored in the registry or upvalues.
Calling C from Lua: Functions, Registration, and Modules
Learn how Lua calls C functions through lua_CFunction and the stack API, including argument checks, pushed results, errors, registration, continuations, and loadable modules.
Lua C API Overview: State, Stack, Calls, Errors and Memory
Start a lua_State, run code, manipulate and query the Lua C API stack, call functions safely, handle errors, register C functions, and understand allocation.